<?php 
defined('_JEXEC') or die;

// disable core styles to avoid bs conflict 
OC_Util::$core_styles = array();

if(isDevMode()) {
   OCP\Util::addStyle('resumes', 'resumes');
   OCP\Util::addStyle('calendar', 'calendar.common');
   OCP\Util::addStyle('company', 'company');

   OCP\Util::addScript('resumes', 'offsiteresume');
} else {
   OCP\Util::addStyle('static', 'resumes');
   OCP\Util::addScript('static', 'apps/offsiteresume.min');
}

$source = isset($_['info']->source) ? $_['info']->source : "";

switch ($source) {
   case '51job':
      $sourcefrom = "前程无忧";
      break;
   case 'zhilian':
      $sourcefrom = "智联招聘";
      break;
   case 'jiancai':
      $sourcefrom = "建筑英才";
      break;
   default:
      $sourcefrom = "第三方网站";
      break;
}

?>
<div class="offsiteresume_action">
   <span class="selectedActions" style="display: inline-block; position:relative;">
      <a href="javascript:void(0)" id="import" class="import <?php echo empty($_['info']->is_imported) ? '' : 'imported';?>" data-type='<?php echo $_['info']->source;?>' <?php echo empty($_['info']->is_imported) ? 'title="导入公司云人才库"' : 'title="重新导入"';?> >
         <i class="import"></i><?php echo empty($_['info']->is_imported) ? '导入' : '已导入';?>
      </a>
      <?php $iknow_import = JRequest::getString('iknow_import', null, 'cookie'); ?>
      <?php if(!$iknow_import) :?>
      <em class="hr_resumerequiredtip medium iknowtext">
         <em>导入后即可对简历进行<b>下载、转发、收藏</b>等操作。</em><em class="iknow" data-cookiename="iknow_import" data-cookie="7">我知道了</em>   
      </em>
      <?php endif; ?>
   </span>
</div>

<div class="put_offsiteresume">
         <div id='resumecontent' data-id='<?php echo $_['info']->id; ?>' 
                                 data-resumecode='<?php echo $_['info']->resume_code;?>'
                                 data-added='<?php echo $_['info']->date_added; ?>'
                                 data-source='<?php echo $_['info']->source;?>'>
                                 
            <img src="/images/3/loadm.gif"></img>
         </div> 
</div>

<!-- Modal 51job -->
<div id="accountsetdialog_51job" class="modal hide fade accountsetdialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"></div>
<!-- Modal zhilian -->
<div id="accountsetdialog_zhilian" class="modal hide fade accountsetdialog" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"></div>
<!-- Modal Import Confirm -->
<div class="modal hide fade import_confirm" data-source="<?=$source?>" aria-hidden="false">
   <div class="modal-header">
      <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
      <h3>&nbsp;</h3>
   </div>
   <div class="modal-body">
      <div class="confirmtext import hide">导入简历将扣除您在<?php echo $sourcefrom;?>的<b>1个下载数</b>，是否确认？</div>
      <div class="confirmtext imported hide">重新导入将不再扣除<?php echo $sourcefrom;?>下载数，是否<b>重新导入</b>？</div>
      <button class="ppp_bluebtn">确定</button>
   </div>
</div>
